package com.etc.myblog.entity;

import java.text.SimpleDateFormat;
import java.util.Date;

public class Reply {
	private int replyId;
	private Comment comment;
	private User user;
	private String replyContent;
	private Date replyTime;
	
	
	public int getReplyId() {
		return replyId;
	}
	public void setReplyId(int replyId) {
		this.replyId = replyId;
	}
	public Comment getComment() {
		return comment;
	}
	public void setComment(Comment comment) {
		this.comment = comment;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public String getReplyContent() {
		return replyContent;
	}
	public void setReplyContent(String replyContent) {
		this.replyContent = replyContent;
	}
	public String getReplyTime() {
		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
		   String dateString = formatter.format(replyTime);
		   return dateString;
	}
	public void setReplyTime(Date replyTime) {
		this.replyTime = replyTime;
	}
	@Override
	public String toString() {
		return "Reply [replyId=" + replyId + ", comment=" + comment + ", user="
				+ user + ", replyContent=" + replyContent + ", replyTime="
				+ replyTime + "]";
	}
	
}
